package net.dodoman.thread;

public class ThreadCopy extends Thread {

	private int num;
	private int count;

	public ThreadCopy(int num) {
		this.num = num;
		System.out.println("创建线程" + num);
	}

	@Override
	public void run() {
		while (true) {
			System.out.println("线程" + num + "执行" + count);
			count++;
			if (count > 3)
				return;
		}
		// super.run();
	}

	public static void main(String[] args) {
		for (int i = 0; i < 5; i++)
			new ThreadCopy(i + 1).start();
	}

}
